#!/usr/bin/env bash

source "$rvm_scripts_path/functions/autolibs"

__rvm_autolibs_show()
{
  __rvm_autolibs_get

  echo "${rvm_autolibs_flag}"
}

__rvm_autolibs_status()
{
  __rvm_autolibs_get
  __rvm_autolibs_translate_description

  printf "%b" "---
value: ${rvm_autolibs_flag}
number: ${rvm_autolibs_flag_number}
runner: ${rvm_autolibs_flag_runner}
description: ${rvm_autolibs_flag_description}
"
}

__rvm_autolibs()
{
  if
    __rvm_autolibs_translate "$1"
  then
    __rvm_autolibs_set
  else
    case "${1:-help}" in
      (show|status|reset)
        __rvm_autolibs_${1}
        ;;
      (help)
        rvm_help autolibs "$@"
        ;;
      (*)
        rvm_error_help "Unknown subcommand '$*' for autolibs" autolibs "$@"
        return 1
        ;;
    esac
  fi
}

__rvm_autolibs "${args[@]}"
